﻿using System;
using BIS.Portal.Core.Base;
using BIS.Portal.Core.Global;

namespace BIS.Portal.Modules.CMS
{
    public partial class CmsMenuControl_Settings : ControlSettingBase
    {
        #region Load Data Settings
        public string CssClassName
        {
            get { return GetControlSetting<string>(ModuleSettingNames.CmsMenu.txtClassName,PortalContext.LanguageAlias);}
        }
        public bool HienThiSubMenu
        {
            get { return GetControlSetting<bool>(ModuleSettingNames.CmsMenu.ddlHienThiSubMenu, PortalContext.LanguageAlias); }
        }
        public string ClassNameActived
        {
            get { return GetControlSetting<string>(ModuleSettingNames.CmsMenu.txtClassActive, PortalContext.LanguageAlias); }
        }
        #endregion
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) txtClassName.Text = CssClassName;
        }
        public override void SaveSettings(System.Collections.Generic.Dictionary<string, string> settings)
        {
            SetControlSettingForAllLanguages(txtClassName.ID, ModuleSettingNames.CmsMenu.txtClassName, settings);
            SetControlSettingForAllLanguages(ddlHienThiSubMenu.ID, ModuleSettingNames.CmsMenu.ddlHienThiSubMenu, settings);
            SetControlSettingForAllLanguages(txtClassActive.ID, ModuleSettingNames.CmsMenu.txtClassActive, settings);
        }
    }
}